package btanalyzer.downloader;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class DownloadTaskInvokerImpl implements DownloadTaskInvoker {

	@Scheduled(cron="0 10 0/12 * * ?")
//	@Scheduled(fixedRate=60 * 60 * 1000)
	@Override
	public void invoke() {
		downloadTask.run();
	}
	
	@Autowired
	private DownloadTask downloadTask;
	public void setDownloadTask(DownloadTask downloadTask) {
		this.downloadTask = downloadTask;
	}
	public DownloadTask getDownloadTask() {
		return downloadTask;
	}

}
